Sep 16, 2016

Flash Text With JQuery


In this post we are going to do text flashing with JQUERY .With the help of toggle class and CSS we can flash the text.Change the text colour with the help of css as shown below.






div {
display:block;
width:100%;
height:35px;
line-height:35px;
padding-left:10px;
background:#eeeccc;
font-weight:bold;

color: red; }
div.blink { color: blue; }
<br /></div>



JQuery Code




var bl = $('div');
setInterval(function() {
bl.toggleClass('blink');
}, 500);



HTML Code



<div>FLASH NEWS</div>



See the Demo Here

0 comments:

Post a Comment